package edu.scut.luluteam.contextlib.Tools;

import android.util.Log;

import edu.scut.luluteam.contextlib.bean.ContextInfo;
import edu.scut.luluteam.contextlib.utils.okhttp.OkHttpManager;

/**
 * @author Guan
 * @date Created on 2018/11/21
 */
public class Repository {
    private static final String TAG = "Repository";

    private static final String ADD_CONTEXT_INFO = "http://125.216.242.147:8686/context/addContextInfo";

    /**
     * TODO 上传采集的情景信息
     *
     * @param info
     */
    public static void postContextInfo(ContextInfo info) {

        Log.e(TAG, info.toJson());
        OkHttpManager.postJson(ADD_CONTEXT_INFO, info.toJson(), new OkHttpManager.ResultCallback() {
            @Override
            public void onSuccess(String result) {
                Log.e(TAG, result);
            }
        });

    }

}
